package lab02.test19;

/**
 * Created by w on 2017/10/30.
 */
public class Text {
    public static void main(String[] args) {
        String name = "HelloWord";
        char[] b =name.toCharArray();
        StringBuffer sb=new StringBuffer();
        int i;
        int k;
        for (i=b.length-1;i>=0;i--){


            if (b[i]>='A'&&b[i]<='Z'){
                sb.append(String.valueOf(b[i]).toLowerCase());
            }else if (b[i]>='a'&&b[i]<='z'){
                sb.append(String.valueOf(b[i]).toUpperCase());

            }

        }
        System.out.println(sb);
    }
}
